home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
macdrivermuseum.net
/
www.macdrivermuseum.net.tar
/
www.macdrivermuseum.net
/
nic
/
daynaccard121.sit
/
communicard installer 1.2.1 mac
/
CommuniCard Installer 1.2.1
/
Dayna CommuniCard
< prev
next >
Wrap
Text File
|
1995-11-10
|
7KB
|
354 lines
! Dayna CommuniCard Plus
!
! 'mlts' resource info for this modem:
! byte 1 == 01 -> modem HAS builtin reliability protocols
! byte 2 == 00 -> reserved by Apple
! byte 3 == FF -> max hex chars in varstr 7 (255 dec)
! byte 4 == 00 -> max hex chars in varstr 8
! byte 5 == 00 -> max hex chars in varstr 9
!
@ORIGINATE
@ANSWER
!
! Set up the modem - label range is 1-10
!
! Mac talks to the modem at 57,600 bps.
serreset 57600, 0, 8, 1
!
! reset the serial port handshake options
HSReset 0 1 0 0 0 0
!
settries 0
@LABEL 1
flush
matchclr
matchstr 1 3 "OK\13\10"
! &F - recall factory settings
! &K3 - Enable CTS/RTS Hardware flow control (Set by AT&F)
! W2 - gives Connect with DCE result codes
! X4 - Use extended result codes (Set by AT&F)
! \J0 - Disable auto port rate adjust
! &M0 - Use asynch mode (no reliability protocols) (Same as above)
! S7=90 - To allow for an international call
! S0=0 - Don't answer calls (Set by AT&F)
! E0 - Turn command echo off
! \V1 - Enable protocol result code (14400/LAPM)
write "AT&FE0W2\\J0\\N0&M0S7=90\13"
matchread 30
inctries
iftries 2 71
! Modem not responding, send long break.
LBreak
jump 1
!
@LABEL 3
! Modem responding & configured.
! Determine if reliable link is requested.
!
! If modem mnp10 link requested (var 4 == 2) then jump label 4
! If modem v42 link requested (var 4 == 1) then jump label 5
! If no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 9
!
ifstr 4 4 "2"
ifstr 4 5 "1"
ifstr 4 9 "0"
!
! Else invalid value in var 4, exit with error
jump 76
!
@LABEL 4
! MNP10 reliable modem link is requested
!
@LABEL 5
! Reliable link is requested. OK for LAP-M -> MNP 4.
matchclr
matchstr 1 7 "OK\13\10"
! W2 - gives Connect with DCE result codes
! \N3 - v42 autoreliable mode
! "H0 - Compression (v42bis, MNP 5) disabled
write "ATW2\\N3"H0\13"
matchread 300
jump 71
!
@LABEL 7
! If we DID support v42b in the modem, this is where it would go.
!
@LABEL 9
! If speaker on flag is true, jump to label 13. Else turn off the speaker.
ifstr 2 13 "1"
pause 5
matchclr
matchstr 1 13 "OK\13\10"
write "ATM0\13"
matchread 30
jump 71
!
! Modem ready, so enable answer or dial mode - label range is 11-30
! Determine if answer or originate mode.
!
@LABEL 13
pause 5
ifANSWER 62
!
! Dial type dispatch
!
! Normal dialing (parm 6 == 0) jump to 19
! Blind dialing (parm 6 == 1) jump to 17
! Manual dialing (parm 6 == 2) jump to 15
!
ifstr 6 19 "0"
ifstr 6 17 "1"
ifstr 6 15 "2"
!
! Else invalid value in var 6, exit with error
jump 76
!
@label 15
note "Manual dialing initiated..." 3
! X1 - ignore dialtone and busy for manual dialing, D to dial
write "ATX1D \13"
jump 32
!
@label 17
note "Dialing without dialtone." 3
matchclr
matchstr 1 19 "OK\13\10"
! X3 - ignore dialtone but report busy for blind dialing
write "ATX3\13"
matchread 30
jump 71
!
! This is where we break up long dialstrings.
! This modem has a 255 chars command buffer and dial string
! fragmentation is not supported by Hayes.
! Labels 19 - 27 reserved.
!
@label 19
! Parameter 1 contains the full dialstring from the connection document.
! Parameter 3 contains "P" for pulse & "T" for tone dialing.
! Parameter 7, 8 & 9 contain the dial string fragments.
!
note "Dialing ^1." 3
write "ATD^3^7\13"
jump 32
!
! Connecting - label range is 31-60
!
@LABEL 32
matchclr
!
matchstr 1 68 "RING\13\10"
matchstr 2 72 "NO DIALTONE\13\10"
matchstr 3 73 "NO CARRIER\13\10"
matchstr 4 73 "ERROR\13\10"
matchstr 5 74 "BUSY\13\10"
matchstr 6 75 "NO ANSWER\13\10"
!
matchstr 7 34 "CONNECT 1200\13\10"
matchstr 8 34 "CONNECT 1200/LAPM\13\10"
matchstr 9 35 "CONNECT 2400\13\10"
matchstr 10 35 "CONNECT 2400/LAPM\13\10"
matchstr 11 36 "CONNECT 4800\13\10"
matchstr 12 36 "CONNECT 4800/LAPM\13\10"
matchstr 13 37 "CONNECT 7200\13\10"
matchstr 14 37 "CONNECT 7200/LAPM\13\10"
matchstr 15 38 "CONNECT 9600\13\10"
matchstr 16 38 "CONNECT 9600/LAPM\13\10"
matchstr 17 39 "CONNECT 12000\13\10"
matchstr 18 39 "CONNECT 12000/LAPM\13\10"
matchstr 19 40 "CONNECT 14400\13\10"
matchstr 20 40 "CONNECT 14400/LAPM\13\10"
matchstr 21 41 "CONNECT 16800\13\10"
matchstr 22 41 "CONNECT 16800/LAPM\13\10"
matchstr 23 42 "CONNECT 19200\13\10"
matchstr 24 42 "CONNECT 19200/LAPM\13\10"
matchstr 25 43 "CONNECT 21600\13\10"
matchstr 26 43 "CONNECT 21600/LAPM\13\10"
matchstr 27 44 "CONNECT 24000\13\10"
matchstr 28 44 "CONNECT 24000/LAPM\13\10"
matchstr 29 45 "CONNECT 26400\13\10"
matchstr 30 45 "CONNECT 26400/LAPM\13\10"
matchstr 31 46 "CONNECT 28800\13\10"
matchstr 32 46 "CONNECT 28800/LAPM\13\10"
!
matchread 700
! If in ANSWER mode, loop back.
! Else in ORIGINATE mode, the modem has timed out.
ifANSWER 32
jump 71
!
! This modem has been setup to do CTS handshaking,
! and we assume that a CTS handshaking cable is being used,
! so we leave the serial port set to 57600 bps.
!
@LABEL 34
note "Communicating at 1200 bps." 2
CommunicatingAt 1200
jump 58
!
@LABEL 35
note "Communicating at 2400 bps." 2
CommunicatingAt 2400
jump 58
!
@LABEL 36
note "Communicating at 4800 bps." 2
CommunicatingAt 4800
jump 58
!
@LABEL 37
note "Communicating at 7200 bps." 2
CommunicatingAt 7200
jump 58
!
@LABEL 38
note "Communicating at 9600 bps." 2
CommunicatingAt 9600
jump 58
!
@LABEL 39
note "Communicating at 12000 bps." 2
CommunicatingAt 12000
jump 58
!
@LABEL 40
note "Communicating at 14400 bps." 2
CommunicatingAt 14400
jump 58
!
@LABEL 41
note "Communicating at 16800 bps." 2
CommunicatingAt 16800
jump 58
!
@LABEL 42
note "Communicating at 19200 bps." 2
CommunicatingAt 19200
jump 58
!
@LABEL 43
note "Communicating at 21600 bps." 2
CommunicatingAt 21600
jump 58
!
@LABEL 44
note "Communicating at 24000 bps." 2
CommunicatingAt 24000
jump 58
!
@LABEL 45
note "Communicating at 26400 bps." 2
CommunicatingAt 26400
jump 58
!
@LABEL 46
note "Communicating at 28800 bps." 2
CommunicatingAt 28800
jump 58
!
@LABEL 58
! Add 5 second delay to insure compatibility with ARA 2.0.1.
! Each unit in the CCL is 1/10th of a second.
pause 50
!
ifANSWER 59
pause 30
!
@LABEL 59
exit 0
!
! @ANSWER
! Set the modem to answer on 1st ring - label range is 61-70
!
@LABEL 62
matchclr
! On match jump to MODEM STATUS and wait for RING
matchstr 1 32 "OK\13\10"
write "ATS0=1\13"
matchread 30
jump 71
!
! RING entry point
! If ORIGINATE mode return to waiting for input.
! Else claim the serial port and return.
!
@LABEL 68
ifORIGINATE 32
userhook 1
note "Answering call..." 2
jump 32
!
! Error messages - label range is 71-100
!
! Modem Not Responding
@LABEL 71
exit -6019
!
! No Dialtone
@LABEL 72
exit -6020
!
! No Carrier or Error
@LABEL 73
exit -6021
!
! Busy
@LABEL 74
exit -6022
!
! No Answer
@LABEL 75
exit -6023
!
! Invalid Varstring Value
@LABEL 76
exit -6027
!
! Hang up the modem - label range is 101-120
!
@HANGUP
!
@LABEL 102
flush
settries 0
HSReset 0 1 0 0 0 0
!
@LABEL 105
! Drop the modem into command mode with escape sequence.
! Then tell modem to hangup.
! Repeat hangup command and escape sequence 3 times max.
!
flush
matchclr
matchstr 1 108 "OK\13\10"
pause 10
write "+++"
matchread 15
!
@LABEL 108
matchclr
matchstr 1 111 "NO CARRIER\13\10"
matchstr 2 111 "OK\13\10"
matchstr 3 111 "ERROR\13\10"
write "ATH0\13"
matchread 30
inctries
iftries 3 71
jump 105
!
! recall the factory setting.
!
@LABEL 111
pause 15
matchclr
matchstr 1 114 "OK\13\10"
write "AT&F\13"
matchread 30
jump 71
!
@LABEL 114
exit 0
!
! Labels 121-128 are reserved for future emergency hacks.
!